<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class CreateOpenShopOrganizationRegionMappingTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('open_shop_organization_region_mapping', function (Blueprint $table) {
            $table->id();
            $table->bigInteger('manageId')->default(0)->comment('关联组织主键ID');
            $table->unsignedInteger('provinceCode')->default(0)->comment('省区code');
            $table->string('provinceName')->default('')->comment('省区名字');
            $table->tinyInteger('isDeleted')->default(0)->comment('是否删除 0 否 1 是');
            $table->collation = 'utf8mb4_general_ci';
            $table->index('manageId');
            $table->comment = '(开店组织管理区域关联表)';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('open_shop_organization_region_mapping');
    }
}
